/**
 * 服务
 * */
package org.zmhhxl.user.service;


import org.zmhhxl.api.auth.domain.entity.UserInfo;
import org.zmhhxl.api.auth.domain.entity.dto.UserRoleDTO;
import org.zmhhxl.api.auth.domain.entity.dto.UserThirdPartyUserDTO;
import org.zmhhxl.common.core.domain.Result;

import java.util.Optional;


public interface UserInfoService {

//   /**
//    * Page page.
//    *
//    * @param page  the page
//    * @param limit the limit
//    * @return the page
//    */
//   Page<UserInfo> page(Integer page, Integer limit);

   /**
    * Find by username user info.
    *
    * @param username the username
    * @return the user info
    */
   UserInfo findByUsername(String username);


   //UserInfo save(UserInfoDTO userInfoDTO);

   Result<UserInfo> save(UserInfo userInfo);

   /**
    * Update.
    *
    * @param userInfo the user info
    */
   void update(UserInfo userInfo);

   /**
    * Delete by id.
    *
    * @param userId the user id
    */
   void deleteById(Long userId);

   /**
    * Enable.
    *
    * @param userId the user id
    */
   void enable(String userId);

   /**
    * Find by id user info.
    *
    * @param userId the user id
    * @return the user info
    */
   Optional<UserInfo> findById(Long userId);

   //Set<ThirdPartyUser> getThirdPartyUsers();

   /**
    * Change password.
    *
    * @param passwordDTO the password dto
    */
   //void changePassword(UserPasswordDTO passwordDTO);

   /**
    * Bind roles.
    *
    * @param userRoleDTO the user role dto
    */
   void bindRoles(UserRoleDTO userRoleDTO);
   void bindRoles(Long userId, Long roleId);

   void unbindRoles(UserRoleDTO userRoleDTO);
   void unbindRoles(Long userId, Long roleId);

   void bindThirdPartyUser(UserThirdPartyUserDTO userThirdPartyUserDTO);
   void bindThirdPartyUser(Long userId, Long thirdPartyUserId);
   void unbindThirdPartyUser(UserThirdPartyUserDTO userThirdPartyUserDTO);
   void unbindThirdPartyUser(Long userId, Long thirdPartyUserId);
}
